<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<meta charset="UTF-8">
<title>练习1</title>
</head>
<body>
	<h3>样例</h3>
	<p style="color: red">1</p>
	<p style="color: green">2</p>
	<hr />
	<h3>代码实现</h3>
	<c:forEach var="arr" items="${requestScope.arrs}">
		<c:choose>
			<c:when test="${arr%2==1}">
				<p style="color: red">${arr}</p>
			</c:when>
			<c:otherwise>
				<p style="color: green">${arr}</p>
			</c:otherwise>
		</c:choose>
	</c:forEach>
</body>
</html>